@RestController
@RequestMapping("/api/business")
public class BusinessController {

    @Autowired
    private BusinessService businessService;

    @PostMapping("/process")
    public ResponseEntity<String> processBusiness(@RequestBody BusinessRequest request) {
        try {
            businessService.processBusiness(request);
            return ResponseEntity.ok("业务处理成功");
        } catch (Exception e) {
            // 捕获异常并打印日志
            log.error("业务处理失败: ", e);
            return ResponseEntity.status(500).body("业务处理失败: " + e.getMessage());
        }
    }
}
